/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-04-27
 * Time: 21:46
 */
public class Test1 {
    public static void walk(IRunning running) {
        System.out.println("一起去散步！");
        running.run();
    }
    public static void main(String[] args) {
        Dog dog = new Dog("小狗");
        walk(dog);

        Frog frog = new Frog("小青蛙");
        walk(frog);
    }
}



